<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

{% if request.user.is_authenticated %}
    <p>用户: {{ request.user }}</p>
    <p><a href="{% url 'demo:demo_change_pass' %}">修改密码</a></p>
    <p><a href="{% url 'demo:demo_logout' %}">注销用户</a></p>
{% else %}
    <form action="." method="post">
        {% csrf_token %}
        <p>用户: <input type="text" name="username"></p>
        <p>密码: <input type="text" name="pwd"></p>
        <input type="submit" value="提交">
    </form>
{% endif %}

</body>
</html>